import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Game game = new Game();
        game.printWelcome();

        while ( true ) {
            String line = in.nextLine();
            String[] words = line.split(" ");
            if ( words[0].equals("help") ) {
                game.printHelp();
            } else if (words[0].equals("go") ) {
                game.goSite(words[1]);
            } else if ( words[0].equals("take") ) {
                game.take(words[1]);
            } else if ( words[0].equals("attack") ) {
                game.attack(words[1]);
            } else if ( words[0].equals("restart") ) {
                game.restart();
            } else if ( words[0].equals("bye") ) {
                break;
            } else {
                System.out.println("输入格式错误，请重新输入！");
            }
        }
    }
}
